import 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import Fastclick from 'fastclick'
import VueLazyload from 'vue-lazyload'
// 公用样式
import 'common/stylus/index.styl'
import {
  Swipe,
  SwipeItem
} from 'mint-ui'
// 注册lodash
import _ from 'lodash'
Object.defineProperty(Vue.prototype, '_', {
  value: _
})
// 注册图片懒加载
Vue.use(VueLazyload, {
  preLoad: 1.3, // 预加载高度的比例
  error: 'static/default.png',
  loading: 'static/default.png', // 加载时图像的src
  attempt: 1 // 尝试计数
})
Vue.component(Swipe.name, Swipe)
Vue.component(SwipeItem.name, SwipeItem)

Fastclick.attach(document.body)
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
